package com.boot.validate.custom;

import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;

public class NameJsrValidator implements ConstraintValidator<NameJsr,Object> {

    private static final String NAME = "Tom";

    @Override
    public void initialize(NameJsr constraintAnnotation) {

    }

    @Override
    public boolean isValid(Object value, ConstraintValidatorContext context) {
        if (NAME.equals(value)){
            return true;
        }
        return false;
    }
}
